<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
</head>
<body>
	<div id="moduleHtml">
	  <div ><input id="loginNameInput" value="用户名"/></div>
	  <div ><input id="loginPwdInput" value="密码" type="password"/></div>
	  <div ><a id="loginSubmit" >进入</a></div>
	</div>
</body>
  <script>
  //cofit_module_js
    Cofit.moduleSourceCode.login=function(dom){
      var module = {
        dom : $(dom) ,          
        
        show : function(){
          var dom=$(this.dom);
          
          $("body").append(dom);
          dom.dialog({
              title: 'Coffee Desk',    
              width: 400,    
              height: 200,    
              closed: false,    
              cache: false,    
              modal: true,
              closable : false
          });

          dom.find("#loginSubmit").linkbutton({    
          }); 
          dom.find("#loginSubmit").click(function(){
        	  module.onLogin();
          });
          
          dom.fadeOut(0);
          dom.fadeIn("slow");
        },

        onLogin : function(){
        	//TODO 登录之后
        	dom.fadeOut("slow",function(){
        		dom.dialog("close");
        	});
     	   Cofit.load("title_bar",function(module){
     		      module.show();
     		    });
        }
      
      };
      return module;
    };
  //cofit_module_js
  </script>
</html>